package util

import (
	"fmt"
	"math/rand"
	"time"
)

func Sleep() {
	time.Sleep(1000 * time.Millisecond)
}

func Printf(format string, a ...interface{}) {
	//Sleep()
	fmt.Printf(format, a...)
}

func HalfProbabilityDo() bool {
	return rand.Intn(10000) >= 5000
}

func HighProbabilityDo() bool {
	return rand.Intn(10000) >= 2000
}

func LowProbabilityDo() bool {
	return rand.Intn(5000) >= 2000
}

func RandNum(n int) int {
	return rand.Intn(n)
}
